/**
 * 流程业务配置
 */
layui.config({
  base: '/'
}).extend({
  flying: 'flying'
}).define(['index', 'flying'], function (exports) {  //先加载index模块，里面配置了全局的入口
  let admin = layui.admin;
  let flying = layui.flying;
  let form = layui.form;
  let table = layui.table;
  let layer = layui.layer;
  let dropdown = layui.dropdown;

  flying.table({
    elem: '#LAY-biz-config-table',
    url: '/process/getProcessBizConfigPageList', //数据接口
    cols: [
      {type: 'checkbox', fixed: 'left'}
      , {type: 'numbers', fixed: 'left', title: '序号'}
      , {field: 'bizCode', title: '业务编码', minWidth: 100}
      , {field: 'bizName', title: '业务名称', minWidth: 100}
      , {field: 'procDefKey', title: '流程定义KEY', minWidth: 100}
      , {field: 'remark', title: '备注'}
      , {field: 'tenantId', title: '租户号', minWidth: 90}
      , {field: 'updatedBy', title: '更新人', minWidth: 90}
      , {field: 'updatedTime', title: '修改时间', templet: '<div>{{ layui.util.toDateString(d.updatedTime, "yyyy-MM-dd HH:mm:ss") }}</div>',  minWidth: 170, sort: true}
      // , {title: '操作', width: 160, align: 'center', fixed: 'right', toolbar: '#biz-config-table'}
    ]
  });

  //监听工具条
  table.on('tool(LAY-biz-config-table)', function (obj) {
    let line_data = obj.data;
    if (obj.event === 'edit') {

    } else if (obj.event === 'del') {

    }
  });

  //对外暴露的接口
  exports('bizConfig', {});
});

